<?php 

    // Add New Button
    $linkAddNew = $this->baseUrl($this->currentController . '/add');
    $imgAddNew  = $this->imgUrl . '/toolbar/icon-32-new.png';  
    $btnAddNew  = $this->myButton('Add New', $linkAddNew, $imgAddNew, 'link');
    
    // Delete Items Button
    $linkDeleteItems = $this->baseUrl($this->currentController . '/multi-delete');
    $imgDeleteItems  = $this->imgUrl . '/toolbar/icon-32-delete.png';
    $btnDeleteItems  = $this->myButton('Delete Items', $linkDeleteItems, $imgDeleteItems, 'submit');
    
    // Sort Item Button
    $linkSortItem = $this->baseUrl($this->currentController . '/sort');
    $imgSortItem  = $this->imgUrl . '/toolbar/icon-32-sort.png';
    $btnSortItem  = $this->myButton('Sort Item', $linkSortItem, $imgSortItem, 'submit');
    
    // Active Items Button
    $linkActiveItems = $this->baseUrl($this->currentController . '/status/type/1');
    $imgActiveItems  = $this->imgUrl . '/toolbar/icon-32-active.png';
    $btnActiveItems  = $this->myButton('Active Items', $linkActiveItems, $imgActiveItems, 'submit');
    
    // Inactive Items Button
    $linkInactiveItems = $this->baseUrl($this->currentController . '/status/type/0');
    $imgInactiveItems  = $this->imgUrl . '/toolbar/icon-32-inactive.png';
    $btnInactiveItems  = $this->myButton('Inactive Items', $linkInactiveItems, $imgInactiveItems, 'submit');
    
    
    // Back Button
    $linkBack = $this->baseUrl($this->currentController);
    $imgBack  = $this->imgUrl . '/toolbar/icon-32-back.png';
    $btnBack  = $this->myButton('Back', $linkBack, $imgBack, 'link');
    
    // Edit Item Button
    $linkEditItem = $this->baseUrl($this->currentController . '/edit/id/' . $this->arrParam['id']);
    $imgEditItem  = $this->imgUrl . '/toolbar/icon-32-edit.png';
    $btnEditItem  = $this->myButton('Edit Item', $linkEditItem, $imgEditItem, 'link');
    
    // Save Item Button
    if($this->arrParam['action'] == 'add') {
    	$linkSaveItem = $this->baseUrl($this->currentController . '/add');
    	
    }else{
    	$linkSaveItem = $this->baseUrl($this->currentController . '/edit/id/' . $this->arrParam['id']);
    }
   
    $imgSaveItem  = $this->imgUrl . '/toolbar/icon-32-save.png';
    $btnSaveItem  = $this->myButton('Save Item', $linkSaveItem, $imgSaveItem, 'submit');
    
    // Cancel Button
    $linkCancel = $this->baseUrl($this->currentController);
    $imgCancel  = $this->imgUrl . '/toolbar/icon-32-cancel.png';
    $btnCancel  = $this->myButton('Cancel', $linkCancel, $imgCancel, 'link');
    
    // Accept Button
    $linkAccept = $this->baseUrl($this->currentController . '/delete/id/' . $this->arrParam['id']);
	$imgAccept  = $this->imgUrl . '/toolbar/icon-32-accept.png';
	$btnAccept  = $this->myButton('Accept', $linkAccept, $imgAccept, 'submit');
   
    
    switch ($this->arrParam['action']){
    	case 'index' : $strBtn = $btnActiveItems . ' ' . $btnInactiveItems . ' ' .
    			$btnAddNew . ' ' . $btnSortItem .  ' ' . $btnDeleteItems;
    			break;
    	case 'edit' : $strBtn = $btnSaveItem . ' ' . $btnCancel;
    			break;
    	case 'add' : $strBtn = $btnSaveItem . ' ' . $btnCancel;
    			break;
    	case 'delete' : $strBtn = $btnAccept . ' ' . $btnCancel;
    			break;
    	case 'info' : $strBtn = $btnEditItem . ' ' . $btnBack;
    			break;
    	default:	$strBtn = '';
    }
    
?>
<div id="toolbar-box">

                            <div class="t"><div class="t"><div class="t"></div></div></div>

                            <div class="m">

                                <div id="toolbar" class="toolbar" >				
                                 <?php echo $strBtn; ?>
                                  <div class="clr"></div>

                                </div>

                                <div class="header icon-48-install"><?php echo $this->Title; ?></div>

                                

                                <div class="clr"></div>

                            </div>

                            <div class="b"><div class="b"><div class="b"></div></div></div>

                        </div>
